package com.njwb.day15.zqzb.ios.io;

import java.io.*;

public class OutputStreamWriters {
    public static void main(String[] args) {
        InputStreamReader ipr=null;
        OutputStreamWriter opw=null;
        try {
            ipr =new InputStreamReader(new FileInputStream("C:\\Users\\86187\\Desktop\\新建文件夹 (9)\\新建 文本文档2.txt"),"gbk");
//            opw = new OutputStreamWriter(new FileOutputStream("C:\\Users\\86187\\Desktop\\新建文件夹 (9)\\新建 文本文档2.txt"), "gbk");
           int ch;
            while((ch=ipr.read())!=-1){
//                opw.write(ch);
//                opw.flush();
                System.out.print((char)ch);
            }
        }
        catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
